package com.ice.work.moment.tencent.dao.user;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ice.work.moment.tencent.facade.model.User;
import org.springframework.stereotype.Repository;

/**
 * @Description Cookie dao
 * @Author DELL
 * @Create 2019-01-10
 * @Since 1.0.0
 */
@Repository
public class UserRepository extends ServiceImpl<IUserMapper, User> implements IUserRepository {

    @Override
    public User findByOpenIdAndDataStatus(String openId,Integer dataStatus){
        return this.baseMapper.selectOne(new QueryWrapper<User>().lambda().eq(User::getOpenId,openId).eq(User::getDataStatus, dataStatus));
    }
}


